package cn.iocoder.yudao.module.knowledge.dal.mysql.elecdatacontact;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.knowledge.dal.dataobject.elecdatacontact.ElecDataContactDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.knowledge.controller.admin.elecdatacontact.vo.*;

/**
 * 用电信息 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ElecDataContactMapper extends BaseMapperX<ElecDataContactDO> {

    default PageResult<ElecDataContactDO> selectPage(ElecDataContactPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ElecDataContactDO>()
                .eqIfPresent(ElecDataContactDO::getConsNo, reqVO.getConsNo())
                .likeIfPresent(ElecDataContactDO::getConsName, reqVO.getConsName())
                .eqIfPresent(ElecDataContactDO::getDqlxr, reqVO.getDqlxr())
                .eqIfPresent(ElecDataContactDO::getTsdlxdh, reqVO.getTsdlxdh())
                .eqIfPresent(ElecDataContactDO::getTsdlxr, reqVO.getTsdlxr())
                .orderByDesc(ElecDataContactDO::getId));
    }

}